package main

import (
	"fmt"
	"time"
)

func main() {
	// 定义空接口
	var x interface{}
	x = 100      // 接受int
	x = "sdas"   // 接受 str
	x = false    // 接受 bool
	x = struct { // 接受 struct
		name string
		age  int
	}{name: "花花", age: 18}

	fmt.Println(x)

	// 空接口类型的 map
	var MapInfo = make(map[string]interface{}, 100)
	MapInfo["addr"] = "北京"
	MapInfo["distance"] = 180
	MapInfo["time"] = time.Now()

	fmt.Println(MapInfo)
}
